package com.example.service.newsImpl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.domain.news;
import com.example.mapper.news.newsQuery;
import com.example.service.news.newService;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

@Service
public class newServiceImpl extends ServiceImpl<newsQuery, news> implements newService {

    @Resource
    private newsQuery newsQuery;


    @Override
    public List<news> findAllnews(String openid) {
        return newsQuery.findnews(openid);
    }


    @Override
    public boolean insertnews(news news1) {
        return newsQuery.insert(news1)>0;
    }

    @Override
    public List<news> selectall(int a, int b,String name) {
        return newsQuery.selectall(a,b,name);
    }

    @Override
    public int num() {
        return newsQuery.num();
    }
}
